﻿using System.Linq;
using System.Net;

namespace ICommonLibrary.Net {

    public class NetUtil {

        public static IPAddress GetInterNetworkIPAddress() {
            IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName());
            return host.AddressList.FirstOrDefault(ip => ip.AddressFamily.ToString() == "InterNetwork");
        }

    }
}